package com.yj.ccs.abs.common.enums;

/**
 * Copyright 2018 (C) Yunjian-VC
 * Created on : 2018/3/16
 * Author     : Unbelievable9
 **/
public enum  ParentCompanyType {

    /**
     * 1 - 母公司
     * 2 - 终极母公司
     */

    PARENT(1),
    FINAL_PARENT(2);

    private final Integer value;

    ParentCompanyType(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public static ParentCompanyType fromValue(Integer value) {
        for (ParentCompanyType parentCompanyType : ParentCompanyType.values()) {
            if (parentCompanyType.getValue().equals(value)) {
                return parentCompanyType;
            }
        }

        return null;
    }
}
